<?php

/**
 * Description of o2ostoreimage
 *
 * @author libaoling
 * @time 2014-12-19
 */
class O2ogoodsimageModel extends BaseModel
{
    var $table  = 'o2o_goods_image';
    var $prikey = 'image_id';
    var $_name  = 'o2ogoodsimage';
    
    var $_relation = array(
        // 一个商品图片只能属于一个店铺
        'belongs_to_storeo2o' => array(
            'model'         => 'storeo2o',
            'type'          => BELONGS_TO,
            'foreign_key'   => 'store_id',
            'reverse'       => 'has_o2ogoodsimage',
        ),
    );
}
